<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>已解决的问题</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <script src="static/sool/js/global.js"></script>

    <script>
        JsAndCssUtil.importCss("/static/css/amazeui.min");
        JsAndCssUtil.importCss("/static/css/app");
        JsAndCssUtil.importCss("/static/css/font-awesome.min");
        JsAndCssUtil.importCss("/static/css/font-awesome");
        JsAndCssUtil.importCss("/static/css/font-glyphicons");
        JsAndCssUtil.importCss("/static/sool/style/basic");
        JsAndCssUtil.importCss("/static/sool/style/detailQuestionSolved");
        JsAndCssUtil.importCss("/static/sool/style/mainQuestion");
        JsAndCssUtil.importCss("/static/sool/style/similaryQuestion");
        JsAndCssUtil.importCss("/static/sool/umeditor/themes/default/css/umeditor");
    </script>

</head>

<body>

<!--头部logo与我要提问的显示-->
<div id="ContainerId">
    <script type="text/javascript">
        renderNavBar();
    </script>
</div>

<!--页面header和footer之间的部分-->
<div class="dq-frame am-animation-scale-down">

    <!--用来展示问题以及答案的详细信息-->
    <div class="dq-frame-left" id="div_answer">

    </div>

    <!--相似问题-->
    <div class="dq-frame-right doc-similary-style" id="question_info">

    </div>

    <!--清除浮动-->
    <div class="clearFloat"></div>

</div>

<!--底部版权模块-->
<footer class="am-margin-top doc-footer-color">
    <hr/>
    <p class="am-text-center">
        <small>
            @copy;2015用友能源科技有限公司版权所有 京ICP备15038140号-1   官方微博   用户协议
        </small>
    </p>
</footer>

<script type="text/javascript">
    //插件文件
    JsAndCssUtil.importJs("/static/sool/js/jquery");
    JsAndCssUtil.importJs("/static/js/amazeui.min");
    JsAndCssUtil.importJs("/static/js/handlebars.min");

    /*加载logo和NAV和search*/
    JsAndCssUtil.importJs("/static/sool/js/nav");

    /*加载引入公共的useID的文件*/
    JsAndCssUtil.importJs("/static/sool/data/bindingData");

    //自己的js文件
    JsAndCssUtil.importJs("/static/sool/data/detailQuestionSolved");
    JsAndCssUtil.importJs("/static/sool/js/similarQuestion");

    //umeditor所需文件
    JsAndCssUtil.importJs("/static/sool/umeditor/umeditor.min");
    JsAndCssUtil.importJs("/static/sool/umeditor/lang/zh-cn/zh-cn");
    JsAndCssUtil.importJs("/static/sool/umeditor/publish.umeditor.config");

</script>

<!--[if lt IE 9]>
<script>
    JsAndCssUtil.importJs("/static/js/modernizr-2010.07.16dev");
    JsAndCssUtil.importJs("/static/js/amazeui.ie8polyfill.min");
</script>
<![endif]-->

<!--用来展示问题以及答案的详细信息的模板-->
<script type="text/x-handlebars-template" id="answerinfo_template">
    {{#with resultData}}
    <div class="dq-frame-left-question">

        <div class="doc-question-title-left">
            <img src="{{imgUrl pk_sool_user}}" alt="" height="68px" width="68px">
        </div>

        <div class="doc-question-title-right">
            <h3 class="dq-frame-left-question-title">
                <i class="fa fa-star am-text-danger"></i>&nbsp;{{question_title}}
            </h3>
            <div class="doc-question-title-right-bottom">
                <span class="dq-frame-left-question-username">
                    <i class="fa fa-user dq-icon-color"></i>
                    <a href="javascript:;">{{sool_username}}</a>
                </span>
                <span class="dq-frame-left-question-readnum">
                    <i class="fa fa-comments dq-icon-color"></i>{{answercount}}&nbsp;回答
                </span>
                <span class="dq-frame-left-question-date">
                    <i class="fa fa-clock-o dq-icon-color"></i>{{submissiontime}}
                </span>
            </div>
        </div>
        <div class="dq-frame-left-question-info">
            {{{description}}}
            {{#if new_file_url}}
            <br>
            <a href="{{new_file_url}}">
                <i class="fa fa-paperclip"></i>
                下载附件 : {{old_fileName}}
            </a>
            {{/if}}
        </div>
    </div>
    <div class="dq-frame-left-answer">
        <div class="dq-frame-left-answer-remind-adopt">
            <img src="static/images/decoration.png" alt="" height="30px" width="30px">
            <span>提问者采纳</span>
        </div>
    {{#with smartAdoptQuestionAnswer}}
    <div class="dq-frame-left-answer-detail">
        <div class="doc-icon-location">
            <img src="{{imgUrl pk_answer_sool_user}}" alt="" width="40px" height="40px">
        </div>
        <div class="doc-detail-location">
            <div class="dq-frame-left-answer-detail-solver">
                {{#transtype usertype}}
                <i class="fa fa-user dq-icon-color"></i>{{sool_username}}
                {{else}}
                <i class="fa fa-user dq-icon-color2"></i><a href="javascript:;">运维人员</a>
                {{/transtype}}
            </div>
            <div class="dq-frame-left-answer-detail-date">
                <span><i class="fa fa-clock-o dq-icon-color doc-time-color"></i>&nbsp;{{recoverytime}}</span>
            </div>
            <div class="doc-containeQuestion">
                <h4>{{{adopt_answer_farther}}}</h4>
                {{#if new_file_url}}
                <br>
                <a href="{{new_file_url}}">
                    <i class="fa fa-paperclip"></i>
                    下载附件 : {{old_fileName}}
                </a>
                {{/if}}
                {{#if list}}
                {{#with list}}
                {{#each this}}
                <div><span style="color:#EE5E0F">追问：</span>
                    {{{question_son}}}
                    {{#if question_new_file_url}}
                    <br>
                    <a href="{{question_new_file_url}}">
                        <i class="fa fa-paperclip"></i>
                        下载附件 : {{question_old_fileName}}
                    </a>
                    {{/if}}
                </div>
                <div><span style="color:#36A803">追答：</span>
                    {{{adopt_answer_son}}}
                    {{#if answer_new_file_url}}
                    <br>
                    <a href="{{answer_new_file_url}}">
                        <i class="fa fa-paperclip"></i>
                        下载附件 : {{answer_old_fileName}}
                    </a>
                    {{/if}}
                </div>
                {{/each}}
                {{/with}}
                {{/if}}
                <div class="clearFloat"></div>
            </div>
        </div>

    </div>
    {{/with}}

    <div class="dq-frame-left-answer-remind">
        <img src="static/images/others.png" alt="" height="25px" width="25px">
        <span>其他答案:</span>
    </div>

   {{#if smartQuestionAnswerList}}
   {{#with smartQuestionAnswerList}}
        {{#each this}}
            <div class="dq-frame-left-answer-detail">
                <div class="doc-icon-location">
                    <img src="{{imgUrl pk_answer_sool_user}}" alt="" width="40px" height="40px">
                </div>
                <div class="doc-detail-location">
                    <div class="dq-frame-left-answer-detail-solver">
                        {{#transtype usertype}}
                        <i class="fa fa-user dq-icon-color"></i>&nbsp;<a href="javascript:;">{{sool_username}}</a>
                        {{else}}
                        <i class="fa fa-user dq-icon-color2"></i>&nbsp;<a href="javascript:;">运维人员</a>
                        {{/transtype}}
                    </div>
                    <div class="dq-frame-left-answer-detail-date">
                        <i class="fa fa-clock-o dq-icon-color doc-time-color"></i>&nbsp;{{recoverytime}}</div>
                    <div  class="doc-containeQuestion">
                        <h4>{{{answer_farther}}}</h4>
                        {{#if new_file_url}}
                        <br>
                        <a href="{{new_file_url}}">
                            <i class="fa fa-paperclip"></i>
                            下载附件 : {{old_fileName}}
                        </a>
                        {{/if}}
                        {{#if list}}
                        {{#with list}}
                        {{#each this}}
                        {{#if question_son}}
                        <div><span style="color:red">追问：</span>
                            {{{question_son}}}
                            {{#if question_new_file_url}}
                            <br>
                            <a href="{{question_new_file_url}}">
                                <i class="fa fa-paperclip"></i>
                                下载附件 : {{question_old_fileName}}
                            </a>
                            {{/if}}
                        </div>
                        {{/if}}
                        {{#if answer_son}}
                        <div><span style="color:green">追答：</span>
                            {{{answer_son}}}
                            {{#if answer_new_file_url}}
                            <br>
                            <a href="{{answer_new_file_url}}">
                                <i class="fa fa-paperclip"></i>
                                下载附件 : {{answer_old_fileName}}
                            </a>
                            {{/if}}
                        </div>
                        {{/if}}
                        {{/each}}
                        {{/with}}
                        {{/if}}
                        <div class="clearFloat"></div>
                    </div>
                </div>
            </div>
        {{/each}}
    {{/with}}
    {{/if}}

    </div>
    {{/with}}
</script>

<!--相似问题的模板-->
<script type="text/javascript">
    loadSimilaryQuestion();
</script>

<!--
<script type="text/javascript">
    $(function(){
        var s = location.href;
        var pk_question = s.substr(s.indexOf("=") + 1,20);
    });
</script>
-->

<script type="text/javascript">

    //获得问题以及答案的详细信息
    getinfo();

    //搜索按钮
    searchClick();

    //获得相似问题
    getSimilarQuestion();

    //判断搜索到的相似问题是否为精华问题
    Handlebars.registerHelper("isEssenceQuestion", function(essence, options){
        if(essence == 0){
            return options.fn(this);
        }else{
            return options.inverse(this);
        }
    });
</script>

</body>
</html>